<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN"><HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=ISO-8859-1">
<META HTTP-EQUIV="Content-Style-Type" CONTENT="text/css">

<LINK REL="STYLESHEET" HREF="../book.css" CHARSET="ISO-8859-1" TYPE="text/css">
<title>Ignoring Resources from Release</title>

</HEAD>
<BODY BGCOLOR="#ffffff">
<H1 CLASS="Head">
Ignoring Resources from Release</H1>
<P CLASS="Para" Label=Type>When synchronizing resources, it is possible that
there are some resources that you do not want to release to the stream.&nbsp;
There are two ignore facilities provided, allowing the user to specify which
resources should be excluded from catch up and release operations.</P>
<P CLASS="Para" Label=Type>The first is a global ignore facility, provided by the
workbench. The second is the CVS ignore facility, which reads the contents of a
special file .<i>cvsignore</i> to determine what to ignore.</P>
<h2 Label=Type>Why Ignore Files When Synchronizing?</h2>
<P Label=Type>There are many files that a user may not want to release to the repository.&nbsp;
For example, external editors may create temporary files in your project.&nbsp; Compilation of .java files creates .class files, and<br>
likewise many build operations result in binary files. These files, when taken together, may
be quite large.&nbsp; In addition, they may be re-generated whenever a build is performed,
resulting in many&nbsp; outgoing changes.  Typically these are not files that one wants to share with other members of a team or persist in the repository.&nbsp;&nbsp;</P>
<DIV CLASS="Subtopic">
<h2>
Global Ignore Facility</h2>
<p CLASS="Head">A global ignore facility is provided by the workbench via the
Team preference page.
There is a list of file patterns against which resources will be matched before they are
considered as version control candidates.&nbsp;
These patterns may contain the wildcard characters "*" and "?".&nbsp; "*"
represents any sequence of zero or more characters.&nbsp; "?" represents any one
character.&nbsp; For example, you can specify a pattern of "*~", which would match
any temporary files that end with "~".&nbsp;&nbsp; Any file or directory that matches any one of the
patterns will be ignored during&nbsp; catch up or release operations.&nbsp; When
you specify a file pattern to ignore, you can temporarily disable ignoring the
file pattern by de-selecting it from the list; you do not have to remove the
specified file pattern from the list.<br>
<br>
The patterns in the global ignore facility are matched against resource names during a
synchronize operation.&nbsp; It is important to note that the path leading up to the resource name is not
included in the matching.&nbsp; For example, for the file &quot;/path/to/file.txt&quot;, only the string
&quot;file.txt&quot; is matched against the patterns.&nbsp; This facility is not intended for specifying fully-qualified
path names but for specifying globally-applicable patterns.<br>
</p>
<h2>CVS Ignore Facility</h2>
<p CLASS="Head">The Eclipse CVS client recognizes a file named &quot;.cvsignore&quot; in each directory
of a project.&nbsp; This is a standard CVS facility and many existing CVS projects may contain this file.<br>
<br>
This text file consists of a list of files, directories, or patterns.&nbsp; In a similar way
to the global ignore facility, the wildcards "*" and "?" may be present in any entry in the
.cvsignore
file.&nbsp; Any file or subdirectory <b> in the current directory</b> that matches any one of the patterns
will be ignored.&nbsp; It is important to note that the semantics of this file
differs from that of the global ignore facility in that it applies only to files and&nbsp;
directories in the same directory as the .cvsignore file itself.&nbsp; A project may contain
one .cvsignore file in each directory.&nbsp; For more information, please visit&nbsp;
http:\\www.cvshome.org.&nbsp;
</p>
</DIV>
<h2>When is a Resource Ignored?</h2>
<p>Once a resource is under version control, it cannot easily be subsequently be
ignored.&nbsp; A resource comes under version control in the first place when a
synchronize operation is performed on a resource or any of its parent
folders.&nbsp; You should consider, prior to performing your first&nbsp;
synchronize operation, which files and directories you wish to ignore, and add
them to the appropriate ignore facility.&nbsp; For example, consider the
following scenario:</p>
<ol>
  <li>Create file &quot;file.txt&quot;.</li>
  <li>Synchronize &quot;file.txt&quot; with the server.</li>
  <li>Add &quot;file.txt&quot; or a matching pattern to .cvsignore or to the
    global ignore facility.</li>
  <li>Change file.txt.</li>
  <li>Synchronize &quot;file.txt&quot; with the server.</li>
  <li>Observe: file.txt is listed as an outgoing change.<br>
  </li>
</ol>
<h3>Ignoring Resources that Appear in the Synchronization View</h3>
<p>If you have selected the Team &gt; Synchronize with Stream operation, but not
yet released, you can still ignore them.&nbsp; This despite the fact that the
workbench already considers these files as being under version control.&nbsp;
You first have to delete the files that you want ignored (this is usually is not a problem since ignored files are either temporary or
build results of your important files, the source).&nbsp; Then add the ignore pattern using either the global or
CVS ignore mechanism.&nbsp; At this point you can rebuild your project so that the ignored files return and then
synchronize your project with the stream. The files will now be ignored.<br>
&nbsp;<br>
<img src = ../ngibmcpy.gif width="195" height="12">
</p>


</BODY>
</HTML>
